const express = require('express');
const orderController = require('../controllers/orderController');
const authMiddleware = require('../middlewares/authMiddleware');

const router = express.Router();

// 获取订单信息
router.get('/:id', authMiddleware, orderController.getOrder);

// 创建新订单
router.post('/', authMiddleware, orderController.createOrder);

// 更新订单信息
router.put('/:id', authMiddleware, orderController.updateOrder);

// 删除订单
router.delete('/:id', authMiddleware, orderController.deleteOrder);

module.exports = router;
